' For Build project as slsql.dll
' %SLSQL = 1
' For Build Standart SQLiteningU.Dll
' %SLSQL = 0 or comment line
%SLSQL = 1

' For Build ALL-in-1 library without use other dll
%SLSQL_ONLY = 1


%DebugEXE = 1

#Dim All

#Compile Exe "..\Bin\DEBUG\SLSQL_ONLY_DLL\DebugEXE.Exe"
#Include "..\Inc\libslsql.inc"

'==============================<[ Main ]>==============================
Function PBMain()

   Local NumRecs As Long
   Local lStart  As Double
   Local lEnd    As Double
   Local st      As String

   ' Connect to the server -- omit this call to run in local mode
   ' or use the slSetProcessMods function to explicitly switch to
   ' local mode without dropping the server connection.  No server
   ' name will default to LocalHost.
   sluConnect 0,0,0,0,0


   '//
   '//  TEST #1  - Client/Server remote mode
   '//

   ' Save our starting time
   lStart = Timer

   ' Open the sample database
   'sluOpen "sample.db3"

   ' Select record set (should be 10,000 rows returned)
   'sluSel "Select * from Parts"

   ' Process records
   NumRecs = 0
   'Do While sluGetRow
      Incr NumRecs
      ' When a row is returned, you use the slF, slFN, slFX, slFNX functions.
      ' Example:
      ' lsA = slF(1) & ", " & slF(2) & "," & slFN("Product")
   'Loop

   ' Save the time it took to run this test so we can display it later.
   lEnd = Timer - lStart

   ' Build the string that will display the results
   st = st & _
        "Test 1:  Retrieve " & Format$(NumRecs) & " rows from server (LocalHost)." & _
        "  Time: " & Format$(lEnd, "##.0000") & " seconds." & $CrLf & $CrLf

   ? st

End Function
